#!/usr/bin/env python
# coding: utf-8
from os import system
from string import letters
import sys

system('mkdir {0}'.format(sys.argv[1]))
system('mkdir {0}/caps'.format(sys.argv[1]))

letters = ['α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω'] 
print letters

for letter in letters:
    system('convert -pointsize 150 -fill black -undercolor white label:\'{1}\' {0}/{1}.png'.format(sys.argv[1], letter))
    system('convert {0}/{1}.png -negate {0}/{1}.png'.format(sys.argv[1], letter))
    system('convert {0}/{1}.png -gravity center -background black -extent 256x256 {0}/{1}.png'.format(sys.argv[1], letter))

print "Font written to directory {0}.".format(sys.argv[1])
